/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.chlitina.store.common.config.Global;
import com.chlitina.store.common.web.BaseController;
import com.chlitina.store.modules.expert.entity.SolutionFaceCare;
import com.chlitina.store.modules.expert.service.SolutionFaceCareService;
import com.chlitina.store.modules.expert.service.SolutionFaceService;

/**
 * 方案护理关联Controller
 * @author liujiang
 * @version 2013-11-05
 */
@Controller
@RequestMapping(value = Global.ADMIN_PATH+"/expert/solutionFaceCare")
public class SolutionFaceCareController extends BaseController {

	@Autowired
	private SolutionFaceCareService solutionFaceCareService;

	@Autowired
	private SolutionFaceService solutionFaceService;
	
	@ModelAttribute
	public SolutionFaceCare get(@RequestParam(required=false) Long sid,
			@RequestParam(required=false) Long cid) {
		if (sid != null && cid != null){
			return solutionFaceCareService.getOneByPK(sid, cid);
		}else{
			return new SolutionFaceCare();
		}
	}
}
